# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=vivid
pkgver=0.9.0
pkgrel=1
pkgdesc="Themeable LS_COLORS generator with a rich filetype database"
url="https://github.com/sharkdp/vivid"
arch="all"
license="Apache-2.0 AND MIT"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/sharkdp/vivid/archive/refs/tags/v$pkgver.tar.gz"

export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/vivid -t "$pkgdir"/usr/bin/
}

sha512sums="
fa5be2fdde6c157f0827c457a9b4642a4830994f8adc196ee0cb98032726eec97c538caa430712334acbd6310ad6e47bb3bc8c2bbd6bc786dfde61b6b6906818  vivid-0.9.0.tar.gz
"
